﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="Admin_Account" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">

        table
        {
            border-top: 1px solid #C0C0C0;
            border-left: 1px solid #C0C0C0;
        }
        tr
        {
            border-bottom: 1px solid #C0C0C0;
        }
        td
        {
            border-right: 1px solid #C0C0C0;
        }
        th
        {
            border-right: 1px solid #C0C0C0;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <div align="center">
        <asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" onrowcommand="gvCustomers_RowCommand" Width="100%">
            <Columns>
                <asp:BoundField DataField="Code" HeaderText="Name" />
                <asp:BoundField DataField="MainContact" HeaderText="Account User Name" />
                <asp:BoundField DataField="CompanyName" HeaderText="Company Name" />
                <asp:BoundField DataField="Created" HeaderText="Setup On" 
                    DataFormatString="{0:d}" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" 
                            NavigateUrl='<%# "AddCustomer.aspx?c="+Eval("Id") %>'>Edit</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandArgument='<%#Eval("Id") %>' CommandName="Delete" Text="Delete" 
                            onclientclick="return confirm('Are you sure you want to delete?')"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink runat="server" ID="hplUser" 
                            NavigateUrl='<%# "~/Admin/AccountUser.aspx?ac=" +Eval("Id") %>'>User</asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="White" ForeColor="#000066" />
            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
            <RowStyle ForeColor="#000066" />
            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#007DBB" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#00547E" />
        </asp:GridView>
        <br />

        <asp:Button ID="btnAddCustomer" runat="server" OnClick="Button1_Click" 
            Text="Add New Customer" />
        <br />
    </div>
</asp:Content>

